/**
 * author: XGP
 * date: 2018/07/25
 * des: 人员招聘-招聘规划
 */
import request from '@/utils/request'

/**
 * 查询招聘信息状态统计
 */
export function findStatusCount() {
  return request({
    url: '/hr/recruitment/recruitplan/count4Status',
    method: 'get'
  })
}

/**
 * 按状态查询详细人员信息
 */
export function getRequireList(params) {
  return request({
    url: '/hr/recruitment/recruitplan/page',
    method: 'get',
    params: params
  })
}
/**
 * 新增规划
 */
export function addplan(data) {
  return request({
    url: '/hr/recruitment/recruitplan/add',
    method: 'post',
    data: data
  })
}

/**
 * 删除
 * @param {*} planId
 */
export function deleteplan(planId) {
  return request({
    url: '/hr/recruitment/recruitplan/delete/' + planId,
    method: 'delete'

  })
}



/**
 * 编辑规划
 */
export function updatePlan(data) {
  return request({
    url: '/hr/recruitment/recruitplan/update',
    method: 'put',
    data
  })
}


/**
 * 获取详细信息
 */
export function getdetail(planId) {
  return request({
    url: '/hr/recruitment/recruitplan/find/' + planId,
    method: 'get'
  })
}



/**
 * 放弃申请
 */
export function giveupPlan(data) {
  return request({
    url: '/hr/recruitment/recruitplan/giveup',
    method: 'post',
    data: data
  })
}


/**
 * 重新提交
 */
export function updateBackSubmit(data) {
  return request({
    url: '/hr/recruitment/recruitplan/updateBack',
    method: 'put',
    data: data
  })
}



/**
 * 根据部门查询岗位
 */
export function getPosition(data) {
  return request({
    url: '/hr/recruitment/recruitplan/findPositionByOrg',
    method: 'get',
    params: data
  })
}
